<template>
  <div>
    <div class="app-container">
      <el-container>
        <el-header>
          <h4><b>审核详情</b></h4><hr>
          <el-main>
            <el-row>
              <el-col :span="4">
                <center><img :src="details.avatar" style="width: 70px;height: 70px "></center>
              </el-col>
              <el-col :span="20">
                ID:{{details.id}}
              </el-col>
              <el-col :span="20">
                会员手机号:{{details.phone}}
              </el-col>
              <el-col :span="20">
                注册类型:{{details.registrationType==0?'自主注册':'手工创建'}}
              </el-col>
            </el-row>
          </el-main>
          <h4><b>审核内容</b></h4>
          <el-main>
            <el-row>
              <el-col :span="4">
                审核类型
              </el-col>
              <el-col :span="20">
                {{details.certificationType==0?'快递员认证':'实名认证'}}
              </el-col>
              <span v-if="details.certificationType==0">
                <el-row v-if="details.courierCompany!=null">
                  <el-col :span="4">
                    快递公司
                  </el-col>
                  <el-col :span="20">
                    {{details.courierCompany}}
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="4">
                    工牌或名片照片
                  </el-col>
                  <el-col :span="20">
                    <img :src="details.workIdPhoto" style="width: 400px;height: 200px">
                  </el-col>
                </el-row>

              </span>
              <span v-if="details.certificationType==1">
                <el-col :span="4">
                  证件类型
                </el-col>
                <el-col :span="20">
                  {{details.documentType==0?'工牌/名片':'身份证'}}
                </el-col>
                <el-col :span="4">
                  证件正面
                </el-col>
                <el-col :span="20">
                  <img :src="details.frontOfTheCredential" style="width: 400px;height: 200px">
                </el-col>
                <el-col :span="4">
                  手持证件正面照
                </el-col>
                <el-col :span="20">
                  <img :src="details.pictureOfHoldingTheFrontOfTheCredential" style="width: 400px;height: 200px">
                </el-col>
              </span>
            </el-row>
          </el-main>
          <h4><b>审核详情</b></h4>
          <el-main>
            <el-row>
              <el-col :span="4">
                审核状态
              </el-col>
              <el-col :span="20">
                {{details.status==0?'待审核':details.status==1?'已通过':'已拒绝'}}
              </el-col>
              <span v-if="details.reviewTime==null?false:true">
                <el-col :span="4">
                  操作时间
                </el-col>
                <el-col :span="20">
                  {{details.reviewTime}}
                </el-col>
              </span>
            </el-row>
            <el-row>
              <span v-if="details.status==2">
                <el-col :span="4">
                  拒绝中文原因
                </el-col>
                <el-col :span="20">
                  {{details.rejectionReasonsCN}}
                </el-col>
                <el-col :span="4">
                  拒绝英文原因
                </el-col>
                <el-col :span="20">
                  {{details.rejectionReasonsEN}}
                </el-col>
              </span>
            </el-row>
          </el-main>
        </el-header>
      </el-container>
    </div>
  </div>
</template>
<script>
import { getCertificationReview } from "@/api/personnel/certificationReview";

export default {
  name:"Details",
  data(){
    return {
      //认证审核id
      detailsId:'',
      //
      details:{},
    }
  },
  created(){
    const detailsId = this.$route.params && this.$route.params.detailsId;
    this.detailsId=detailsId;
    this.getCertificationReview();
  },
  activated() {
    this.getCertificationReview();
  },
  methods:{
    getCertificationReview(){
      getCertificationReview(this.detailsId).then(response=>{
        this.details=response.data;
      })
    }
  }
}
</script>
<style>

</style>
